package fr.adfm.dto;

import java.util.Date;
public class VentePriveeDto {
	
	private Long id;
	private Date dateDebut;
	private Date dateFin;
	private MarqueDto marque;
	
	public Date getDateDebut() {
		return dateDebut;
	}
	public void setDateDebut(Date dateDebut) {
		this.dateDebut = dateDebut;
	}
	public Date getDateFin() {
		return dateFin;
	}
	public void setDateFin(Date dateFin) {
		this.dateFin = dateFin;
	}
	
	public VentePriveeDto() {
		super();
	}
	public VentePriveeDto(Date dateDebut, Date dateFin, MarqueDto marque) {
		super();
		this.dateDebut = dateDebut;
		this.dateFin = dateFin;
		this.marque = marque;
	}
	
	public MarqueDto getMarque() {
		return marque;
	}
	public void setMarque(MarqueDto marque) {
		this.marque = marque;
	}
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@Override
	public String toString() {
		return "VentePriveeDto [dateDebut=" + dateDebut + ", dateFin="
				+ dateFin + ", marque=" + marque + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((dateDebut == null) ? 0 : dateDebut.hashCode());
		result = prime * result + ((marque == null) ? 0 : marque.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		VentePriveeDto other = (VentePriveeDto) obj;
		if (dateDebut == null) {
			if (other.dateDebut != null)
				return false;
		} else if (!dateDebut.equals(other.dateDebut))
			return false;
		if (marque == null) {
			if (other.marque != null)
				return false;
		} else if (!marque.equals(other.marque))
			return false;
		return true;
	}
	

}
